[ANN] sv.system - leverage conventions to structure your component-based Clojure systems

2017-02-14 Thread Max Weber


Hi,


I like to introduce you to sv.system (
https://github.com/SimpleValue/sv.system) another component library for 
Clojure. There are many great libraries out there to implement 
component-based Clojure systems, so why should you care about sv.system. If 
I had to pick one reason it would be: sv.system makes it straightforward to 
leverage conventions.

Conventions could provide people with great leverage ("advantage for 
accomplishing a purpose" 
). For example 
probably every Clojure web developer knows that you find the HTTP status 
code under the :status key in a Ring response map.


A sv.system example:


(use 'sv.system.core)
(use 'org.httpkit.server)

(defn start [ring-handler opts]
  (run-server
   ring-handler
   opts))

(defn stop [stop-httpkit]
  (stop-httpkit))

(defn httpkit-server []
  {:binds [:httpkit :server]
   :start [start [:ring :handler] {:port 3000}]
   :stop stop})

(defn hello-handler [name request]
  {:status 200
   :body (str "Hello " name)
   :content-type "text/plain"})

(defn ring-handler []
  {:binds [:ring :handler]
   :start [partial #'hello-handler "World"]})

(defonce system
  (start-system #{(ring-handler) (httpkit-server)}))

;; (stop-system system)


The example starts a httpkit server on http://localhost:3000/ that returns 
"Hello World" as response. Take a look at 
https://github.com/SimpleValue/sv.system to read about the details. The 
example uses the convention that you find the main Ring handler of the 
application under [:ring :handler]. For sure this convention is not 
established. But you can imagine that it could help to orientate yourself, 
when you are joining an existing Clojure project that uses a common set of 
vocabulary for the different components of a typical Clojure system.


I hope you find sv.system useful and I would appreciate your feedback.


Best regards


Max

-- 
You received this message because you are subscribed to the Google
Groups "Clojure" group.
To post to this group, send email to clojure@googlegroups.com
Note that posts from new members are moderated - please be patient with your 
first post.
To unsubscribe from this group, send email to
clojure+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/clojure?hl=en
--- 
You received this message because you are subscribed to the Google Groups 
"Clojure" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to clojure+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[ANN] Process a library inspired by the core idea of Prismatic's Graph

2012-12-21 Thread Max Weber
Hi,

process is another library inspired by the core idea of Prismatic's Graph.
For that reason it also has a lot of goals in common with Stuart Sierra's
Flow  library. You should read
Prismatic's blog
postabout
Graph to get an idea what benefits you can leverage if you use this
fine-grained, composable abstraction
(FCA).
Since Graph is not open source yet we have built the process library to
split up some complex event processing into simple parts. Take a look at
the library:

https://github.com/doo/process

Best regards

Max

-- 
You received this message because you are subscribed to the Google
Groups "Clojure" group.
To post to this group, send email to clojure@googlegroups.com
Note that posts from new members are moderated - please be patient with your 
first post.
To unsubscribe from this group, send email to
clojure+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/clojure?hl=en

Re: Storm

2011-09-21 Thread Max Weber
Thank you very much for such a great contribution to the Clojure
ecosystem! I cannot not wait to use Storm in my Clojure projects :-)

Best regards

Max

On 20 Sep., 17:05, nathanmarz  wrote:
> Yesterday I open-sourced Storm at Strange Loop. Storm is a distributed
> and fault-tolerant realtime computation system hosted 
> athttps://github.com/nathanmarz/storm
>
> Just want to preempt a few questions that I know people are wondering
> about the project:
>
> "Is Storm mostly written in Java?"
>
> If you look at the languages graph on Github, it says that Storm is
> "64% Java". However, this is inaccurate because those numbers include
> the Java code generated by the Thrift compiler. If you exclude the
> generated code, you'll find that Storm is over 50% Clojure in terms of
> line count. In terms of functionality though, Storm is around 98%
> Clojure. The Java code I wrote is mostly interfaces and small classes
> that a user of Storm would encounter in the public API (Java is, ahem,
> verbose).
>
> "Why isn't Storm written completely in Clojure?"
>
> I want Storm to be as accessible to as wide an audience as possible. A
> user's language preference or constraints shouldn't prevent them from
> being able to use Storm to solve their realtime computation problems.
> This is why I chose to define Storm's main interfaces in Java, and
> this is also why Storm supports using any language (including non-JVM
> ones) on top of Storm. That said, Storm has a Clojure DSL for
> programming topologies which is what I personally use for developing
> topologies.
>
> Clojure was a magnificent language to use to build Storm. Storm is a
> complex, intricate system, and Clojure helped a great deal in managing
> the complexity of the implementation.
>
> If you have any questions, I'd be happy to answer them.
>
> -Nathan

-- 
You received this message because you are subscribed to the Google
Groups "Clojure" group.
To post to this group, send email to clojure@googlegroups.com
Note that posts from new members are moderated - please be patient with your 
first post.
To unsubscribe from this group, send email to
clojure+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/clojure?hl=en


[ANN] cljs-devmode - A development mode for ClojureScript

2011-07-27 Thread Max Weber
Hello everyone,

I like to introduce you to cljs-devmode, which is a "development mode" for
ClojureScript. It is really a primitive prototype for a ClojureScript
development mode, but it works for me so far. I only wrote it to get started
with ClojureScript in one of my Clojure web applications.

cljs-devmode allows you to develop Clojure web applications in combination
with ClojureScript seamlessly. You can develop your normal Clojure web
application (with Ring and Compojure for example) and whenever you change a
ClojureScript source file it is automatically recompiled and you can test
the changes in your web browser.

You can find cljs-devmode and a detailed description here:
https://github.com/maxweber/cljs-devmode

Furthermore there is an example project, which shows how to use
cljs-devmode:
https://github.com/maxweber/cljs-devmode-example

There are many things which can be improved. So fork it on GitHub if you are
not satisfied with it. I hope it will serve you well, when you develop
ClojureScript inside your Clojure web application.

Best regards

Max

-- 
You received this message because you are subscribed to the Google
Groups "Clojure" group.
To post to this group, send email to clojure@googlegroups.com
Note that posts from new members are moderated - please be patient with your 
first post.
To unsubscribe from this group, send email to
clojure+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/clojure?hl=en

Re: clojurescript development workflow

2011-07-25 Thread Max Weber
Hi,

today I've been working on cljs-devmode:

https://github.com/maxweber/cljs-devmode

It is a really primitive prototype of a development mode for
ClojureScript. For an explanation take a look at the README on the
GitHub repo. I'm in a hurry so I'm going to continue the work on cljs-
devmode tomorrow. I would appreciate any feedback.

Best regards

Max

On 24 Jul., 23:51, Sam Aaron  wrote:
> Hi there,
>
> Having never really enjoyed javascript and therefore avoiding it for the 
> longest time, I'm now quite excited to jump into it given the introduction of 
> ClojureScript. It's really quite exciting - thanks everyone for putting so 
> much effort and thought into it.
>
> One thing I'm wondering about (and hope that someone with more ClojureScript 
> dev experience than myself could help illuminate things for me) is what a 
> typical ClojureScript development workflow looks like.
>
> With Clojure, I do the following:
>
> * start up a swank server
> * hack in the repl
> * hack in the text editor - sending forms to be evaled on the swank server
> * instantly see/hear (if I'm doing GUI/sound work) the results of my evals
>
> I walked through the first two Google Closure tutorials:
>
> *http://code.google.com/closure/library/docs/gettingstarted.html
> *http://code.google.com/closure/library/docs/tutorial.html
>
> My workflow lacked a REPL (although I believe they exist in some web 
> browsers) but I was able to modify the code, hit refresh in the browser and 
> immediately see changes.
>
> However, when I went through the ClojureScript tutorial:
>
> *https://github.com/clojure/clojurescript/wiki/Quick-Start
>
> Although I did get a REPL, it was totally disconnected from the browser, so I 
> wasn't able to test any GUI stuff with it and if I modified the code I had to 
> wait quite a long time for the js to compile before I saw the changes in the 
> browser.
>
> I'm therefore wondering, how do other people with more experience develop 
> with ClojureScript? Is there any way of getting the wonderful flow of code 
> creation/evaluation/visibility that you can get in a typical Clojure workflow?
>
> Thanks in advance,
>
> Sam
>
> ---http://sam.aaron.name

-- 
You received this message because you are subscribed to the Google
Groups "Clojure" group.
To post to this group, send email to clojure@googlegroups.com
Note that posts from new members are moderated - please be patient with your 
first post.
To unsubscribe from this group, send email to
clojure+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/clojure?hl=en


Re: BDD - Given When Then

2011-07-14 Thread Max Weber
Thank you for your responses. I wrote a prototype for a BDD / "Given
When Then" extension for Lazytest yesterday. Today I'm going to write
some integration tests with it. Along the way I'm going to try to
improve the API. If the extension is useful afterwards, I'm going to
make this stuff available as open source project on GitHub.

Best regards

Max

On 13 Jul., 02:39, ckirkendall  wrote:
> I did just recently port Jim Weirich's ruby based rspec-given to
> Clojure.  It is a very simple BDD framework build on top of
> clojure.test as a set of macros.  You can find the link here.
>
> https://github.com/ckirkendall/ClojureGiven
>
> Creighton Kirkendall
>
> On Jul 11, 2:12 pm, Max Weber  wrote:
>
>
>
>
>
>
>
> > Hi,
>
> > I like to write some integration/acceptance tests in Clojure. At the moment
> > I'm using cuke4duke (cucumber), but I'm not satisfied with it. For my unit
> > tests I'm already using lazytest. In the acceptance tests I like to apply
> > the typical Given When Then template (like cucumber do). So are there any
> > nice alternatives to cucumber/cuke4duke?
>
> > I know circumspec <https://github.com/stuarthalloway/circumspec>, but the
> > project makes no progress anymore? What is the relationship between
> > circumspec and lazytest <https://github.com/stuartsierra/lazytest>? How can
> > acceptance tests be written with lazytest, which follow the Given When Then
> > template (like 
> > this<https://github.com/stuarthalloway/circumspec/blob/master/examples/the...>circumspec
> > example)?
>
> > Best regards
>
> > Max

-- 
You received this message because you are subscribed to the Google
Groups "Clojure" group.
To post to this group, send email to clojure@googlegroups.com
Note that posts from new members are moderated - please be patient with your 
first post.
To unsubscribe from this group, send email to
clojure+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/clojure?hl=en


BDD - Given When Then

2011-07-11 Thread Max Weber
Hi,

I like to write some integration/acceptance tests in Clojure. At the moment
I'm using cuke4duke (cucumber), but I'm not satisfied with it. For my unit
tests I'm already using lazytest. In the acceptance tests I like to apply
the typical Given When Then template (like cucumber do). So are there any
nice alternatives to cucumber/cuke4duke?

I know circumspec , but the
project makes no progress anymore? What is the relationship between
circumspec and lazytest ? How can
acceptance tests be written with lazytest, which follow the Given When Then
template (like 
thiscircumspec
example)?

Best regards

Max

-- 
You received this message because you are subscribed to the Google
Groups "Clojure" group.
To post to this group, send email to clojure@googlegroups.com
Note that posts from new members are moderated - please be patient with your 
first post.
To unsubscribe from this group, send email to
clojure+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/clojure?hl=en

Re: ANN: A Clojure library for the Facebook Graph API - clj-facebook-graph

2011-06-07 Thread Max Weber
Hi Bojan,

there has been a global change within the Facebook Graph API, it
doesn't sent a referer in the headers of the authentication callback
request anymore.
A middleware function of clj-facebook-graph has relied upon this
referer. I have fixed this issue in version 0.1.3-SNAPSHOT, but now
you have to pay attention that you specify the correct :redirect-uri
in your clj-facebook-graph facebook-app-info map, otherwise the
changed middleware will not be able to detect that a request is a
callback request of the facebook authentication flow or just an
ordinary request with a code query parameter. I have to release a
version 0.1.3 soon. Nevertheless the version on GitHub also supports
FQL queries now.

Cheers,

Max

On 6 Jun., 07:52, Bojan Jovičić  wrote:
> I got latest version of your framework from Github and it works OK.
>
> I am not sure if this is related to new settings in Facebook App page (I put
> most of them to Disabled now) or some global change.

-- 
You received this message because you are subscribed to the Google
Groups "Clojure" group.
To post to this group, send email to clojure@googlegroups.com
Note that posts from new members are moderated - please be patient with your 
first post.
To unsubscribe from this group, send email to
clojure+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/clojure?hl=en


Architecture for a Clojure project

2011-05-26 Thread Max Weber
Hi,

imaging you could do a software project from scratch and Clojure is the main
programming language. What architecture would you choose? Of course it
depends, so here are some requirements and basic conditions:

   - Let's assume that we are building a web application for some social
   media stuff
   - So it has to handle a lot of data
   - And it has to scale (there are a lot more read than write operations)
   - Your data store is a NoSQL document database (e.g. MongoDB)
   - Your deployment environment is cloud based (e.g. EC2).
   - It should be an architecture which fits the functional programming
   paradigma: side effects should be rare and controllable
   - The application should be extendable and maintainable

It is obvious that an application cannot been done which fulfills all the
criteria mentioned above one hundred percent. However you may get very close
to one hundred percent for some of the points.

At the moment I would say that CQRS  is the most
promising architectural pattern to do scalable, maintainable and extendable
web applications. Nevertheless I've a very hard time to adapt the common
practices of a CQRS application to the "functional world". Most of the CQRS
stuff today comes from an object oriented world, particularly there are a
lot of .Net projects . There is also a CQRS
Framework for Java named Axon .

Regrettably, there are not much writings about what architecture you should
use, if you are working with a functional programming language in the
context mentioned above. May be I just not find the right websites or books.
So here is my initial question again: What architecture would you choose?

Best regards

Max

-- 
You received this message because you are subscribed to the Google
Groups "Clojure" group.
To post to this group, send email to clojure@googlegroups.com
Note that posts from new members are moderated - please be patient with your 
first post.
To unsubscribe from this group, send email to
clojure+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/clojure?hl=en

Re: ANN: A Clojure library for the Facebook Graph API - clj-facebook-graph

2011-05-10 Thread Max Weber
Hi Bojan,

I've added a basic support to post something against the Facebook
Graph API. The documentation for this new feature can be found under
https://github.com/maxweber/clj-facebook-graph

Best regards

Max

On 9 Mai, 20:22, Bojan Jovičić  wrote:
> Hi Max,
> I have started investigating this, and it works very nice.
>
> I am a noob in Clojure/Java and I have a question about posting to FB using
> your library. I tried something like this:
>
> *(def auth-token (facebook-auth-by-name))
> (def auth-name (first (keys auth-token)))
> (with-facebook-auth-by-name auth-name (fb-get [:me :feed (str "message="
> "test")]))
> *
> But it seems not to work for processing parameters. The documentation for
> posting to FB is 
> here(bottom of the 
> page).

-- 
You received this message because you are subscribed to the Google
Groups "Clojure" group.
To post to this group, send email to clojure@googlegroups.com
Note that posts from new members are moderated - please be patient with your 
first post.
To unsubscribe from this group, send email to
clojure+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/clojure?hl=en


ANN: A Clojure library for the Facebook Graph API - clj-facebook-graph

2011-04-08 Thread Max Weber
Hello everyone,

I like to introduce you to clj-facebook-graph, it is a Clojure client
for the Facebook Graph API and it is based on clj-http and Ring. I
have written a blog post about how to leverage clj-facebook-graph to
query the Facebook Graph API:

http://max-weber.tumblr.com/post/4183433816/clj-facebook-graph

The library is open source and it is hosted on GitHub (https://
github.com/maxweber/clj-facebook-graph).

Best regards

Max

-- 
You received this message because you are subscribed to the Google
Groups "Clojure" group.
To post to this group, send email to clojure@googlegroups.com
Note that posts from new members are moderated - please be patient with your 
first post.
To unsubscribe from this group, send email to
clojure+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/clojure?hl=en


RabbitMQ

2011-03-24 Thread Max Weber
What is the best Clojure library to work with RabbitMQ?

Best regards

Max

-- 
You received this message because you are subscribed to the Google
Groups "Clojure" group.
To post to this group, send email to clojure@googlegroups.com
Note that posts from new members are moderated - please be patient with your 
first post.
To unsubscribe from this group, send email to
clojure+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/clojure?hl=en


ANN: Cologne Clojure User Group (Cologne / Köln - Germany)

2011-02-28 Thread Max Weber
Hello everyone,

back in December 2010 we launch a Clojure User Group for the wider
area of Cologne in Germany. So if you are living in this region and
like to join us, then you can find all necessary information under:

http://www.meetup.com/clojure-cologne/

Best regards

Max

-- 
You received this message because you are subscribed to the Google
Groups "Clojure" group.
To post to this group, send email to clojure@googlegroups.com
Note that posts from new members are moderated - please be patient with your 
first post.
To unsubscribe from this group, send email to
clojure+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/clojure?hl=en


Re: Getting http-agent to throw an exception if url doesn't exist?

2011-01-29 Thread Max Weber
Give clj-http a try (https://github.com/getwoven/clj-http). It has an
architecture similar to the one of Ring. Especially the Ring-style
middleware helps a lot, if you want to add custom behaviour like error
handling to clj-http.

On 27 Jan., 02:21, Michael Ossareh  wrote:
> On Wed, Jan 26, 2011 at 14:57, Stuart Sierra 
> wrote:
>
> > clojure.contrib.http-agent (which I wrote) is deprecated in 1.2 and gone in
> > 1.3.
>
> Which lib is recommended to replace it?

-- 
You received this message because you are subscribed to the Google
Groups "Clojure" group.
To post to this group, send email to clojure@googlegroups.com
Note that posts from new members are moderated - please be patient with your 
first post.
To unsubscribe from this group, send email to
clojure+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/clojure?hl=en


ANN: clj-facebook-graph

2011-01-28 Thread Max Weber
Hey if you like to do something with the (relatively new) Facebook
Graph API (http://developers.facebook.com/docs/api/) give clj-facebook-
graph a try. It's a simple Clojure client for the Facebook Graph API
based on clj-http (https://github.com/getwoven/clj-http) and Ring
(https://github.com/mmcgrana/ring). It offers some convenience when
you are working with the Facebook Graph API. Furthermore clj-facebook-
graph provides a simple authentication flow in the form of some Ring
middleware. The project is at an early stage, but feel free to extend
it and use it as a foundation for your Facebook integration. You can
find it on my github account:

https://github.com/maxweber/clj-facebook-graph

Best regards

Max

-- 
You received this message because you are subscribed to the Google
Groups "Clojure" group.
To post to this group, send email to clojure@googlegroups.com
Note that posts from new members are moderated - please be patient with your 
first post.
To unsubscribe from this group, send email to
clojure+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/clojure?hl=en