Return-Path: X-Original-To: apmail-zest-dev-archive@minotaur.apache.org Delivered-To: apmail-zest-dev-archive@minotaur.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 5534D1881B for ; Wed, 17 Jun 2015 03:47:00 +0000 (UTC) Received: (qmail 67058 invoked by uid 500); 17 Jun 2015 03:47:00 -0000 Delivered-To: apmail-zest-dev-archive@zest.apache.org Received: (qmail 67038 invoked by uid 500); 17 Jun 2015 03:47:00 -0000 Mailing-List: contact dev-help@zest.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@zest.apache.org Delivered-To: mailing list dev@zest.apache.org Received: (qmail 67026 invoked by uid 99); 17 Jun 2015 03:46:59 -0000 Received: from Unknown (HELO spamd2-us-west.apache.org) (209.188.14.142) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 17 Jun 2015 03:46:59 +0000 Received: from localhost (localhost [127.0.0.1]) by spamd2-us-west.apache.org (ASF Mail Server at spamd2-us-west.apache.org) with ESMTP id 3F6CF1A5B5A for ; Wed, 17 Jun 2015 03:46:59 +0000 (UTC) X-Virus-Scanned: Debian amavisd-new at spamd2-us-west.apache.org X-Spam-Flag: NO X-Spam-Score: 1.892 X-Spam-Level: * X-Spam-Status: No, score=1.892 tagged_above=-999 required=6.31 tests=[DKIM_SIGNED=0.1, DKIM_VALID=-0.1, HEADER_FROM_DIFFERENT_DOMAINS=0.001, HTML_MESSAGE=3, RCVD_IN_MSPIKE_H2=-1.108, SPF_PASS=-0.001] autolearn=disabled Authentication-Results: spamd2-us-west.apache.org (amavisd-new); dkim=pass (2048-bit key) header.d=gmail.com Received: from mx1-eu-west.apache.org ([10.40.0.8]) by localhost (spamd2-us-west.apache.org [10.40.0.9]) (amavisd-new, port 10024) with ESMTP id tMSPaoFiOOot for ; Wed, 17 Jun 2015 03:46:57 +0000 (UTC) Received: from mail-ie0-f181.google.com (mail-ie0-f181.google.com [209.85.223.181]) by mx1-eu-west.apache.org (ASF Mail Server at mx1-eu-west.apache.org) with ESMTPS id A0E8A20DC7 for ; Wed, 17 Jun 2015 03:46:56 +0000 (UTC) Received: by iesa3 with SMTP id a3so26037771ies.2 for ; Tue, 16 Jun 2015 20:46:49 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:sender:from:date:message-id:subject:to:content-type; bh=qSVUfSPqKnWpnMSWLKpYmHVyzTotMA0WLhOGADMkTqg=; b=w7mHRNFxrsailzMDvo7lBn040Iqx/+l2+huVszO9jmQMVeYEHU/3cyHerkBWQcFzQH Q1E746y2VwZXnaUlqnUzIImVOUWOGGoMXe+WgpdC0efOUhCedJatN+9qqBfNiRHQiJj8 xB01t+ps9LVMQJBik+jhd9xH/yRzEE+bpNjuilh0NCs0UzG7xl9PTR0F4EU4iY4sezn/ DsjzxKljRaOUmmvMbRClIsw/o3VQL4uQdwtlXzphmefIJK/OG8rParJQiUr3hCb9eab0 ONnQ00LegXmlM8qfMrf8WmGL/8LJBsxUhuEWcDsXWtUdPXHSjh0cNYrQbRLss2Iv6SOl O0bA== X-Received: by 10.107.163.146 with SMTP id m140mr4837653ioe.85.1434512809605; Tue, 16 Jun 2015 20:46:49 -0700 (PDT) MIME-Version: 1.0 Sender: hedhman@gmail.com Received: by 10.36.98.18 with HTTP; Tue, 16 Jun 2015 20:46:29 -0700 (PDT) From: Niclas Hedhman Date: Wed, 17 Jun 2015 11:46:29 +0800 X-Google-Sender-Auth: GKzONM18vK5jt-80AYmKHF2-iFk Message-ID: Subject: Messaging abstraction (for 3.0) To: dev Content-Type: multipart/alternative; boundary=001a113bb0d87141800518ae8a59 --001a113bb0d87141800518ae8a59 Content-Type: text/plain; charset=UTF-8 Gang, I have been thinking a bit about a "Messaging" abstraction, similar to the "Storage" and "Indexing" abstractions, and looked at my own implementations how they are done, and see if we can come up with an Extension mechanism that is suitable for a whole range of Messaging Extensions, such as * Restlet * Jersey * JMS(?) * Kafka * Storm (?) [1] There are a few initial "requirements" that I have written down on my white board; * UnitOfWork-like - i.e. any "result messages" are not sent until everything is completed successfully. * "Destination" concept - the entry point for event request processing * Hierarchical delegation - think "paths", "routing", "intercepts" * Request Parameters - think "headers" in HTTP or other metadata * Request Payload * Payload objects - converted into ValueComposites through mapping * Binary payloads - byte[] blob * Message Receiver is created per request. Factory implementation from user. * Optional Response Messages - probably part of a return type. * Usecase metadata for Request Parameters, possibly lazy deserialization. * Message Destination injection, for outgoing messages. Possibly a new Composite meta type. * Visibility - some messaging may be internal to the application, using the same abstraction. So Visibility should be used as usual. * Capable of distinction between Load Balanced Queues, Pub/Sub and Peer2Peer Queues. In very, very broad strokes, we are looking at something like this (Kafka used as an example); ___________ +----------+ ___________ O partition O--| Kafka ME |--O partition O ----------- +----------+ ----------- | ^ v | +--------------------+ +------------+ | Qi4j Messaging SPI | <--serves--| MC Factory | +--------------------+ +------------+ | ^ | v | | +----------------------+ | | MessageComposite (MC)|<--instantiates--+ +----------------------+ This picture doesn't involve the many options required to be handled, but should serve as a mental model to help understand where I am coming from. Before I start looking at how this could be done, does anyone have any input on the topic (pun intended, as Topics are part of the problem domain somehow, but I haven't worked that out yet) [1] Getting an abstraction right, which allows Zest/Qi4j applications to be part of the Storm topology would be awesome. -- Niclas Hedhman, Software Developer http://zest.apache.org - New Energy for Java --001a113bb0d87141800518ae8a59--