MAEDR
文件大小: unknow
源码售价: 5 个金币 积分规则     积分充值
资源说明:A general purpose server-side application framework
# About
A framework designed for building event driven applications. The goal is to make application development fast, effective and without unnecessary complexities.  Use this to build a ESB (Enterprise Service Bus) , SOA (Service oriented Arch.) service end points or a Web Application. 

# Supported Platforms
* Java >= 1.6
* Linux & Windows
* works with Groovy & Scala out of the box.

# Examples
Lots of examples showcasing how to use the framework, from simple to complex.  All samples
are available in Java, groovy or Scala.

# Features
* Code! and then compile and run via simple command-line menu.
* Package and deploy to remote host via SSH.
* Together with Camungo (An EC2 console), can easily deploy and manage your app on EC2.
* Event driven, asynchronous, workflow driven coding style.
* Code your business logic in units and the framework will handle events and schedule your work units.
* Uses proven open-source libraries such as Netty-NIO, Jetty/Web.
* Plugin architecture allows user defined Event Devices.
* Access and Manage your EC2 instances right from command-line menu.

# Supported Event Devices (Event-Sources)
* HTTP Server
* POP3 Email Receiver
* File Monitoring
* JMS Message Listener
* TCP Socket
* Servlet
* RESTful
* WebSocket
* Timer(s)
* RSS/Atom Reader

# Code! Node.JS style ( using groovy ) - for fun only
// file: demo.groovy
import com.zotoh.maedr.service.*;
import com.zotoh.maedr.device.*;
HTTPService.create(8080).handler(
// callback
    {   evt, args ->
        def res=args[0];
        res.setData(<html> <body> <h1>Bonjour!</h1> </body> </html>);
        evt.setResult(res);
    } as HTTPHandler
).start();
# Making a Workflow
import com.zotoh.maedr.core.Job;
import com.zotoh.maedr.wflow.*;
public class MyFlow extends MiniWFlow {
    //this is how the framework assign you the job.
    public MyFlow(Job j) { super(j); }
    // hand to the framework the 1st(initial) step.
    protected Activity onStart() {
        return new PTask(new Work(){
            public void eval(Job j, Object arg) {
                System.out.println("hello, I am step 1");
            }
        }).chain(new PTask(new Work(){  // step2
            public void eval(Job j, Object arg) {
                System.out.println("hello, I am step 2");
            }
        }));
    }
}
# Command line menu (terminal friendly)
app create/web           ' e.g. create helloworld as a webapp.
app create               ' e.g. create helloworld
app ide/eclipse                    ' Generate eclipse project files.
app compile                        ' Compile sources.
app test                           ' Run test cases.
app debug                    ' Start & debug the application.
app start[/bg]                     ' Start the application.
app run[/bg]          ' Run a Groovy script.
app bundle             ' Package application.
device configure      ' Configure a device.
device add               ' Add a new  device-type.
crypto generate/serverkey          ' Create self-signed server key (pkcs12).
crypto generate/password           ' Generate a random password.
crypto generate/csr                ' Create a Certificate Signing Request.
crypto encrypt          ' e.g. encrypt SomeSecretData
crypto testjce                     ' Check JCE  Policy Files.
demo samples                       ' Generate a set of samples.
version                            ' Show version info.
# Cloud (EC2) menu
cloud configure                    ' Set cloud info & credential.
cloud sshinfo                      ' Set SSH info.
cloud install       ' Install MAEDR to host:target-dir.
cloud app/deploy         ' Deploy app to host:target-dir.
cloud app/run            ' Deploy and run app.
cloud sync    ' Get latest set of Regions or Zones.
cloud image/set          ' Set default Image.
cloud image/*                      ' Launch an Image.
cloud ip/list                      ' List Elastic IPAddrs.
cloud ip/bind       ' Assign IPAddr to VM.
cloud ip/+                         ' Add a new IPAddr.
cloud ip/-                 ' Remove a IPAddr.
cloud vm/list                      ' List Virtual Machines.
cloud vm/set                ' Set default VM.
cloud vm/? [vm-id]                 ' Describe a VM.
cloud vm/* [vm-id]                 ' Start a VM.
cloud vm/! [vm-id]                 ' Stop a VM.
cloud vm/% [vm-id]                 ' Terminate a VM.
cloud sshkey/list                  ' List SSH Keys.
cloud sshkey/set          ' Set default SSH Key.
cloud sshkey/+            ' Add a new SSH Key.
cloud sshkey/-            ' Remove a SSH Key.
cloud secgrp/list                  ' List Security Groups.
cloud secgrp/set            ' Set default Security Group.
cloud secgrp/+              ' Add a new Security Group.
cloud secgrp/-              ' Remove a Security Group.
cloud fwall/+          ' Add a new Firewall rule.
cloud fwall/-          ' Remove a Firewall rule.
:e.g. xyz@tcp#0.0.0.0/0#1#10       ' From port 1 to port 10.
:e.g. xyz@tcp#0.0.0.0/0#22         ' Port 22.
# Lots more to read Goto [http://maedr.zotoh.com/](http://maedr.zotoh.com) # Contact For questions and bug reports, please email [contactzotoh@gmail.com](mailto:contactzotoh@gmail.com) # Latest binary Download the latest bundle [1.0.0](http://maedr.zotoh.com/packages/stable/1.0.0/maedr-1.0.0.tar.gz)

本源码包内暂不包含可直接显示的源代码文件,请下载源码包。