This document discusses middleware in Ruby and provides examples of considerations when writing middleware:
- Middleware should be a long-running daemon process that is compatible across platforms and environments and handles various data formats and traffic volumes.
- Tests must be run on all supported platforms to ensure compatibility as thread and process scheduling differs between operating systems.
- Memory usage and object leaks must be carefully managed in long-running processes to avoid consuming resources over time.
- Performance of JSON parsing/generation should be benchmarked and the most optimized library used to avoid unnecessary CPU usage.
14. Type
Target = class;
public
class function Instance : Target; static;
function Func(value : string ) : Int32;
end;
//ここは普通
var app = new WindowsAppFriend(process);
//拡張メソッドで実現。
//staticなメソッド呼び出し。
dynamic obj = app.Delphi("Target").Instance();
//インスタンスのメソッド呼び出し。
Int ret = obj.Func(“123”);
16. function InvokeStatic(pInvokeInfo : InvokeInfo) : ReturnInfo ; stdcall ;
begin
//リフレクションを使って、指定のstaticメソッドを実行!
end
function InvokeInstance(obj : TObject, pInvokeInfo : InvokeInfo) : ReturnInfo ; stdcall ;
begin
//リフレクションを使って、対象のオブジェクトのメソッドを実行!
end
FriendlyDelphi.dll